<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Title</title>
    <link rel="stylesheet" href="${ctx}/static/layui/css/layui.css">
    <link rel="stylesheet" href="${ctx}/static/css/index.css">
</head>
<body>
<div class="body-head"><span>首页</span></div>

<div class="layui-carousel" id="slideshow">
    <div carousel-item>
        <div><img src="${ctx}/static/images/slideshow/1.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/2.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/3.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/4.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/5.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/6.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/7.jpg" alt="" style="width: 100%;height: 100%;"></div>
        <div><img src="${ctx}/static/images/slideshow/8.jpg" alt="" style="width: 100%;height: 100%;"></div>
    </div>
</div>
<script src="${ctx}/static/layui/layui.js"></script>
<script src="${ctx}/static/js/jquery.min.js"></script>
<script>
    layui.use('carousel', function () {
        var carousel = layui.carousel;
        //建造实例
        carousel.render({
            elem: '#slideshow',
            width: '100%' //设置容器宽度
            ,
            height: '95.5%' //设置容器高度
            ,
            arrow: 'always' //始终显示箭头
            //,anim: 'updown' //切换动画方式
        });
    });
</script>
</body>
</html>
